package com.xunji.xunji.module.account.mvp.model;

import com.huanxiao.base.net.RespResult;
import com.xunji.xunji.module.account.bean.TokenInfo;
import com.xunji.xunji.module.account.bean.UserInfo;

import java.util.Map;

import retrofit2.http.QueryMap;
import rx.Observable;

/**
 * Created by paul on 16/10/18.
 */

public interface IUserModel {

    /**
     * 刷新token
     *
     * @param param
     * @return
     */
    Observable<RespResult<TokenInfo>> tokenCreate(Map<String, String> param);


    /**
     * 发送验证码
     *
     * @param params
     * @return
     */
    Observable<RespResult> sendCode(Map<String, String> params);

    /**
     * 忘记密码短信
     *
     * @param params
     * @return
     */
    Observable<RespResult> sendForgetCode(Map<String, String> params);


    /**
     * 登录
     *
     * @param params
     * @return
     */
    Observable<RespResult<String>> userLogin(Map<String, String> params);


    /**
     * 用户信息
     *
     * @param params
     * @return
     */
    Observable<RespResult<UserInfo>> userInfo(Map<String, String> params);

    /**
     * 退出登录
     *
     * @param params
     * @return
     */
    Observable<RespResult<Object>> loginOut(Map<String, String> params);

    /**
     * 更新头像信息
     *
     * @param params
     * @return
     */
    Observable<RespResult<Object>> refreshHeadIcon(Map<String, String> params);

    /**
     * 注册
     *
     * @param params
     * @return
     */
    Observable<RespResult> register(Map<String, String> params);


    /**
     * 重置密码
     *
     * @param params
     * @return
     */
    Observable<RespResult> resetPswd(Map<String, String> params);

    /**
     * 修改密码
     *
     * @param params
     * @return
     */
    Observable<RespResult> changePswd(Map<String, String> params);


    /**
     * 实名认证
     *
     * @param params
     * @return
     */
    Observable<RespResult> authCertification(Map<String, String> params);


    /**
     * 检查token是否有效
     *
     * @param params
     * @return
     */
    Observable<RespResult> authStatus(Map<String, String> params);


    /**
     * 绑定手机号
     *
     * @param params
     * @return
     */
    Observable<RespResult> authVerifyPhone(Map<String, String> params);

    Observable<RespResult<TokenInfo>> thirdLogin(Map<String, String> params);


    Observable<RespResult<String>> getQiniuUpToken(Map<String, String> params);
}
